package router

import (
	"go_final/mxshop_api/goods_web/api/banner"
	middlewares "go_final/mxshop_api/goods_web/middleware"

	"github.com/gin-gonic/gin"
)

func InitBannerRouter(Router *gin.RouterGroup) {
	GoodsRouter := Router.Group("banners")

	{
		GoodsRouter.GET("", banner.List)
		GoodsRouter.POST("", middlewares.JWTAuth(), middlewares.IsAdmin(), banner.Create)
		GoodsRouter.DELETE("/:id", middlewares.JWTAuth(), middlewares.IsAdmin(), banner.Delete)
		GoodsRouter.PUT("/:id", middlewares.JWTAuth(), middlewares.IsAdmin(), banner.Update)
	}
}
